/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.fei.ClassDiagram.data;

import org.fei.ClassDiagram.Editor.Wrappers.VariableDataWrapper;


/**
 *
 * @author Tomas
 */
public class VariableTextLook extends VariableData {
    
    private boolean isEnumConstant;
    
    public VariableTextLook(VariableDataWrapper variable, boolean isEnum) {
        super(variable);
        this.isEnumConstant = isEnum;
    }
    
    @Override
    public String toString() {
            
        if (isEnumConstant) {
            return var.getName();
        }
        
        String str = new String();
        
        if (var.isStatic())
            str += "s";

        // pridanie medzery ak je treba
        if (str.length() > 0)
            str += " ";
        
        str += super.toString();
        
        return str;
    }
}
